package demo

import (
	"app/internal/middleware"
	"app/library/router"
	"github.com/gin-gonic/gin"
)

// 注册路由
func Router(g *gin.RouterGroup) {
	//路由规则
	g.GET("/hello", router.Bind(DemoController.Hello))                              //不需要登录
	g.POST("/hello", middleware.LoginRequired(), router.Bind(DemoController.Hello)) //需要登录
}
